package Boundry;

import Boundry.GenericTools.IPanelOperation;
import Boundry.GenericTools.InputPanel;
import Boundry.GenericTools.MultiTabbedRequestTableList;

import javax.swing.JTabbedPane;
import javax.swing.JLabel;
import Boundry.GenericTools.RequestTableListPanel;

public class EvaluationPanel extends MultiTabbedRequestTableList implements IPanelOperation {
private String[] strArrTitles;

private String[] strArrText;
private int[] intArrNumberOfTupples;

public void setNumberOfTupples(int table, int numberOfTupple ) {
	this.intArrNumberOfTupples[table] = numberOfTupple;
}



public EvaluationPanel() throws Exception 
	{	
		super(4);
		System.out.println("EvaluationPanel constructor");
		intArrNumberOfTupples = new int[this.numOfTabs];
		
	}
 
	
		
@Override
public void setWhatTobuild()
{
	for (int i=0 ; i< this.numOfTabs ; i++)
	{
		if (intArrNumberOfTupples[i] == 0) //empty table
		{
			setTobuild(i, false);
		}
		else
		{
			setTobuild(i, true);
		}
	}
}



@Override
public String apHelpButton()
{
	 return ("Here the evaluator can see all request that needs to be evaluated. \n " +
	 		"This includes: \n 1.Requests that haven't had time set. \n " +
			"2.Requests that need first evaluation.\n" +
			" 3. Requests that needs more details.\n" );
}

@Override
public void setValuesForAllRequestsTabsTitle() 
{

	strArrTitles = new String[this.numOfTabs];
	strArrTitles[0] =  "Requests for Evaluation  ("+ this.intArrNumberOfTupples[0]+")";
	strArrTitles[1] =  "Requests that needs more information ("+ this.intArrNumberOfTupples[1]+")";
	strArrTitles[2] =  "Requests with no time set ("+ this.intArrNumberOfTupples[2]+")";
	strArrTitles[3] =  "Request with time estimation or extension waiting approval ("+ this.intArrNumberOfTupples[3]+")" ;
	for( int i=0 ; i< this.numOfTabs ; i++)
	{
		this.setTitle(i, strArrTitles[i]);
	}

}
	


@Override
public String setTitle() {
	return ("Evaluation Report");
}



@Override
public void setValuesForAllRequestsUpperText() {
	// TODO Auto-generated method stub
	
}

}


